FocusAcquired
TheFocusAcquired
method is called to notify this part that one of its display frames has acquired the specified focus.
void FocusAcquired (in ODTypeToken focus, in ODFrame ownerFrame);
focus
- A tokenized string representing the focus type to be acquired, expressed as a 32-bit value.
ownerFrame
- A reference to the display frame that has acquired the focus.
DISCUSSION
Thefocus
parameter must be the tokenized form of one of the focus constants (kODClipboardFocus
,kODKeyFocus
,kODMenuFocus
,kODModalFocus
,kODMouseFocus
,kODScrollingFocus
, orkODSelectionFocus
) or the tokenized form of a part-specific focus type. You can call the session object'sTokenize
method to obtain a token corresponding to one of these constants.OpenDoc calls this method to notify this part that the ownership of a focus has been transferred to it. For example, if a containing part uses the arbitrator's
TransferFocus
method to transfer a focus directly from one embedded part to another, the focus module calls the destination part'sFocusAcquired
method.Your part's
FocusAcquired
method is not called when this part requests a focus or focus set using the arbitrator'sRequestFocus
andRequestFocusSet
methods.Your part's
FocusAcquired
method should perform any actions necessary to indicate that it has acquired the focus. For example, acquiring the selection focus might cause your part to highlight its selection.OVERRIDING
When you subclassODPart
, you must override this method. Your override method must not call its inherited method; that is, your override method must implement this method's functionality completely.EXCEPTIONS
kODErrInvalidFrame
- The specified frame is not a display frame of this part.
SEE ALSO
TheODFocusType
type (page 889).
TheODTypeToken
type (page 877).
TheODPart::FocusLost
method (page 518).
TheODSession::Tokenize
method (page 622).
"The FocusAcquired Method" on page 93 in OpenDoc Cookbook.
Table 2-1 on page 89 in OpenDoc Programmer's Guide.
"Transferring Focus Without Negotiation" on page 209 in OpenDoc Programmer's Guide.
"On Frame Activation" on page 211 in OpenDoc Programmer's Guide.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help